package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.UserRecordMapper;
import com.ruoyi.system.domain.UserRecord;
import com.ruoyi.system.service.IUserRecordService;
import com.ruoyi.common.core.text.Convert;

/**
 * 用车记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-06-27
 */
@Service
public class UserRecordServiceImpl implements IUserRecordService 
{
    @Autowired
    private UserRecordMapper userRecordMapper;

    /**
     * 查询用车记录
     * 
     * @param ucarId 用车记录ID
     * @return 用车记录
     */
    @Override
    public UserRecord selectUserRecordById(Long ucarId)
    {
        return userRecordMapper.selectUserRecordById(ucarId);
    }

    /**
     * 查询用车记录列表
     * 
     * @param userRecord 用车记录
     * @return 用车记录
     */
    @Override
    public List<UserRecord> selectUserRecordList(UserRecord userRecord)
    {
        return userRecordMapper.selectUserRecordList(userRecord);
    }

    /**
     * 新增用车记录
     * 
     * @param userRecord 用车记录
     * @return 结果
     */
    @Override
    public int insertUserRecord(UserRecord userRecord)
    {
        return userRecordMapper.insertUserRecord(userRecord);
    }

    /**
     * 修改用车记录
     * 
     * @param userRecord 用车记录
     * @return 结果
     */
    @Override
    public int updateUserRecord(UserRecord userRecord)
    {
        return userRecordMapper.updateUserRecord(userRecord);
    }

    /**
     * 删除用车记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteUserRecordByIds(String ids)
    {
        return userRecordMapper.deleteUserRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用车记录信息
     * 
     * @param ucarId 用车记录ID
     * @return 结果
     */
    @Override
    public int deleteUserRecordById(Long ucarId)
    {
        return userRecordMapper.deleteUserRecordById(ucarId);
    }
}
